package com.job.model;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.sql.Time;

/**
 * 简历接收类
 * @author hasee
 */
@Entity
@Table
public class ReceiveResume {
    /**
     * 简历接收类Id
     */
    private int receiveResumeId;
    /**
     *收到的时间
     */
    private Time receiveTime;
    /**
     * 用户id
     */
    private Integer userId;
    /**
     * 用人单位id
     */
    private Integer employerId;
    /**
     * 工作id
     */
    private Integer jobId;
    /**
     * 简历id
     */
    private Integer resumeId;
    /**
     * 是否已读
     */
    private Boolean read;
    /**
     * 是否约面
     */
    private Boolean interview;
    /**
     * 约面时间
     */
    private Time interviewTime;
    /**
     * 约面 地址
     */
    private String interviewAddress;
    /**
     * 结果
     */
    private String dispose;

    @Id
    @Column(name = "receiveResumeId")
    @GeneratedValue(generator="increment")
    @GenericGenerator(name="increment", strategy = "increment")
    public int getReceiveResumeId() {
        return receiveResumeId;
    }

    public void setReceiveResumeId(int receiveResumeId) {
        this.receiveResumeId = receiveResumeId;
    }

    @Basic
    @Column(name = "receiveTime")
    public Time getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(Time receiveTime) {
        this.receiveTime = receiveTime;
    }

    @Basic
    @Column(name = "userId")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "employerId")
    public Integer getEmployerId() {
        return employerId;
    }

    public void setEmployerId(Integer employerId) {
        this.employerId = employerId;
    }

    @Basic
    @Column(name = "jobId")
    public Integer getJobId() {
        return jobId;
    }

    public void setJobId(Integer jobId) {
        this.jobId = jobId;
    }

    @Basic
    @Column(name = "resumeId")
    public Integer getResumeId() {
        return resumeId;
    }

    public void setResumeId(Integer resumeId) {
        this.resumeId = resumeId;
    }

    @Basic
    @Column(name = "read")
    public Boolean getRead() {
        return read;
    }

    public void setRead(Boolean read) {
        this.read = read;
    }

    @Basic
    @Column(name = "interview")
    public Boolean getInterview() {
        return interview;
    }

    public void setInterview(Boolean interview) {
        this.interview = interview;
    }

    @Basic
    @Column(name = "interviewTime")
    public Time getInterviewTime() {
        return interviewTime;
    }

    public void setInterviewTime(Time interviewTime) {
        this.interviewTime = interviewTime;
    }

    @Basic
    @Column(name = "interviewAddress")
    public String getInterviewAddress() {
        return interviewAddress;
    }

    public void setInterviewAddress(String interviewAddress) {
        this.interviewAddress = interviewAddress;
    }

    @Basic
    @Column(name = "dispose")
    public String getDispose() {
        return dispose;
    }

    public void setDispose(String dispose) {
        this.dispose = dispose;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ReceiveResume that = (ReceiveResume) o;

        if (receiveResumeId != that.receiveResumeId) {
            return false;
        }
        if (receiveTime != null ? !receiveTime.equals(that.receiveTime) : that.receiveTime != null) {
            return false;
        }
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) {
            return false;
        }
        if (employerId != null ? !employerId.equals(that.employerId) : that.employerId != null) {
            return false;
        }
        if (jobId != null ? !jobId.equals(that.jobId) : that.jobId != null) {
            return false;
        }
        if (resumeId != null ? !resumeId.equals(that.resumeId) : that.resumeId != null) {
            return false;
        }
        if (read != null ? !read.equals(that.read) : that.read != null) {
            return false;
        }
        if (interview != null ? !interview.equals(that.interview) : that.interview != null) {
            return false;
        }
        if (interviewTime != null ? !interviewTime.equals(that.interviewTime) : that.interviewTime != null) {
            return false;
        }
        if (interviewAddress != null ? !interviewAddress.equals(that.interviewAddress) : that.interviewAddress != null) {
            return false;
        }
        return dispose != null ? dispose.equals(that.dispose) : that.dispose == null;
    }

    @Override
    public int hashCode() {
        int result = receiveResumeId;
        result = 31 * result + (receiveTime != null ? receiveTime.hashCode() : 0);
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (employerId != null ? employerId.hashCode() : 0);
        result = 31 * result + (jobId != null ? jobId.hashCode() : 0);
        result = 31 * result + (resumeId != null ? resumeId.hashCode() : 0);
        result = 31 * result + (read != null ? read.hashCode() : 0);
        result = 31 * result + (interview != null ? interview.hashCode() : 0);
        result = 31 * result + (interviewTime != null ? interviewTime.hashCode() : 0);
        result = 31 * result + (interviewAddress != null ? interviewAddress.hashCode() : 0);
        result = 31 * result + (dispose != null ? dispose.hashCode() : 0);
        return result;
    }
}
